package com.outstanding.his.revisit.dao.impl;

import java.util.Collection;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.outstanding.his.revisit.dao.IRevisitDao;
import com.outstanding.his.revisit.domain.Revisit;

public class HibernateRevisitDao extends HibernateDaoSupport implements
		IRevisitDao {

	@Override
	public Revisit getRevisit(Integer revisitId) throws DataAccessException {
		Revisit revisit = (Revisit) this.getSession().load(
				Revisit.class, revisitId);
		return revisit;
	}

	@Override
	public Collection<Revisit> getRevisitList() throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Revisit submitRevisit(Revisit revisit) throws DataAccessException {
		this.getHibernateTemplate().saveOrUpdate(revisit);
		return revisit;
	}

	@Override
	public Revisit updateRevisit(Revisit revisit) throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

}
